﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UnsafeDemo
{
    public class Program
    {

        public unsafe static void Main(string[] args) 
        {
            int tvar = 996;
            int* p = &tvar;

            //输出数据
            Console.WriteLine("Data:{0}",tvar);

            //输出指针地址
            Console.WriteLine("Address:{0:x}", (int)p);

            //输出指针指向的数据
            Console.WriteLine("Pointer to data:{0}",p->ToString());
        }

    }
}
